package cn.lili.modules.promotion.service;

import cn.lili.common.vo.PageVO;
import cn.lili.common.vo.ResultMessage;
import cn.lili.modules.order.order.entity.vo.UnionMonthFundsVO;
import cn.lili.modules.order.order.entity.vo.UnionOrderParams;
import cn.lili.modules.promotion.entity.dos.GreenContributionInfo;
import cn.lili.modules.promotion.entity.vos.GreenContributionInfoViewVO;
import cn.lili.modules.promotion.entity.vos.GreenPointStatistic;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.pojos.GmoneyResUser;
import io.swagger.annotations.ApiModelProperty;

/**
 * @author xiangqian
 * @version 1.0
 * @data 2023/12/18 14:15
 */
public interface GreenContributionInfoService extends IService<GreenContributionInfo> {

    /**
     * 分页查询贡献值明细
     *
     * @param greenContributionInfo 查询条件{@link GreenContributionInfo}
     * @param page                  分页条件{@link PageVO}
     * @return 分页返回结果
     */
    Page<GreenContributionInfo> infoPage(GreenContributionInfo greenContributionInfo, PageVO page);

    /**
     * 分页查询绿色积分(绿色积分管理-用户)
     *
     * @param gmoneyResUser 查询条件{@link GmoneyResUser}
     * @param page          分页条件{@link PageVO}
     * @return 分页返回结果
     */
    Page<GmoneyResUser> greenPage(GmoneyResUser gmoneyResUser, PageVO page);

    /**
     * 添加待结算贡献值/绿色积分
     *
     * @param greenContributionInfo 添加数据{@link GreenContributionInfo}
     * @return 返回结果
     */
    Boolean saveSettle(GreenContributionInfo greenContributionInfo);

    /**
     * 添加结算贡献值/绿色积分
     *
     * @param orderSn 订单Sn
     * @return 返回结果
     */
    Boolean settle(String orderSn, String userId);

    /**
     * 修改状态为直接打款
     *
     * @param orderSn 订单号
     * @param userId  用户ID
     * @param status  状态
     */
    Boolean settleDirect(String orderSn, String userId, String status);

    /**
     * 工会贡献值明细
     * @param greenContributionInfo
     * @param page
     * @return
     */
    Page<GreenContributionInfoViewVO> getUnionContributeDetails(GreenContributionInfo greenContributionInfo, PageVO page);

    /**
     * 统计待结算贡献值
     * @param info
     * @return
     */
    ResultMessage<GreenPointStatistic> greenPointStatisticUnsettle(GreenContributionInfo info);

    Page<UnionMonthFundsVO> getSumContributeSettleByUnion(UnionOrderParams params);
}
